﻿@inject IStringLocalizer<DialogComponent> Localizer

<Button @onclick="@OnClickCounter">@Localizer["ComponentOpenDialogButton"]</Button>

@code {
    [Inject]
    [NotNull]
    private DialogService? DialogService { get; set; }

    private Task OnClickCounter() => DialogService.Show(new DialogOption()
    {
        Title = "Built-in Counter component",
        Component = BootstrapDynamicComponent.CreateComponent<Counter>()
    });
}
